﻿CREATE TABLE [dbo].[bddb] (
    [id]          INT             IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [CompanyId]   INT             CONSTRAINT [DF_bddb_CompanyId] DEFAULT ((0)) NULL,
    [CompanyName] NVARCHAR (500)  NULL,
    [Mid]         INT             NULL,
    [MName]       NVARCHAR (500)  NULL,
    [xzcds]       INT             CONSTRAINT [DF_bddb_xzcds] DEFAULT ((0)) NULL,
    [sxs]         INT             CONSTRAINT [DF_bddb_sxs] DEFAULT ((0)) NULL,
    [zsxs]        INT             CONSTRAINT [DF_bddb_zsxs] DEFAULT ((0)) NULL,
    [xdxse]       DECIMAL (18, 2) CONSTRAINT [DF_bddb_xdxse] DEFAULT ((0)) NULL,
    [xdml]        DECIMAL (18, 2) CONSTRAINT [DF_bddb_xdml] DEFAULT ((0)) NULL,
    [xfxse]       DECIMAL (18, 2) CONSTRAINT [DF_bddb_xfxse] DEFAULT ((0)) NULL,
    [xfml]        DECIMAL (18, 2) CONSTRAINT [DF_bddb_xfml] DEFAULT ((0)) NULL,
    [xse]         DECIMAL (18, 2) CONSTRAINT [DF_bddb_xse] DEFAULT ((0)) NULL,
    [ml]          DECIMAL (18, 2) CONSTRAINT [DF_bddb_ml] DEFAULT ((0)) NULL,
    [createdate]  DATETIME        CONSTRAINT [DF_bddb_createdate] DEFAULT (getdate()) NULL,
    [userid]      VARCHAR (20)    CONSTRAINT [DF_bddb_userid] DEFAULT ('') NULL,
    [username]    NVARCHAR (20)   NULL,
    [startdate]   DATETIME        NULL,
    [enddate]     DATETIME        NULL,
    CONSTRAINT [PK_bddb] PRIMARY KEY CLUSTERED ([id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'新增成单数', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'xzcds';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'上线数（本周新成单的百度上线数）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'sxs';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'上线数（所有本周百度上线数，包括以前成单的）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'zsxs';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'新单销售额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'xdxse';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'新单毛利', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'xdml';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'续费销售额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'xfxse';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'续费毛利', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'xfml';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'销售额合计', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'xse';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'毛利合计', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'ml';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'生成日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'createdate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入 人', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'userid';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'对比日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'bddb', @level2type = N'COLUMN', @level2name = N'startdate';

